<!--
 * @Author: gyc
 * @Date: 2020-05-11 13:17:18
 * @LastEditTime: 2020-07-01 14:51:23
 * @Description: Nuxt测试版
 -->
<template>
  <div class="back">
    <header>
      <mo-header></mo-header>
      <div class="mo_block"></div>
    </header>
    <nuxt />
    <footer>
      <mo-footer></mo-footer>
    </footer>
  </div>
</template>
<script>
import head from "@/components/header/header";
import footer from "@/components/footer/footer";
export default {
  name: "dPage",
  data() {
    return {
      headStus: true
    };
  },
  mounted() {
    window.addEventListener("scroll", this.test);
  },
  methods: {
    // test(e) {
    //   let scrollTop =
    //     window.pageYOffset ||
    //     document.documentElement.scrollTop ||
    //     document.body.scrollTop;
    //   if (scrollTop > 100) {
    //     this.headStus = false;
    //   } else if (scrollTop == 0) {
    //     this.headStus = true;
    //   }
    // }
  },
  components: { "mo-header": head, "mo-footer": footer }
};
</script>
<style lang="scss" scoped>
.back {
  // background-color: #efefef;
  background-color: white;
  // background-image: url("/img/back.jpg");
  // background-attachment: fixed;
  // background-position-y: -100px;
}
.mo_block {
  position: relative;
  top: 0;
  width: 100%;
  height: 45px;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
}
</style>